
import { defineStore } from "pinia";

export const useUserStore = defineStore("user", {
	state: () => ({
		avatar: localStorage.getItem("avatar")
			? 'http://localhost:5000' + localStorage.getItem("avatar")
			: null,
	}),
	actions: {
		setAvatar(url) {
			this.avatar = url;
			localStorage.setItem("avatar", url);
		},
	},
});
